<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model app\models\Equip */

/*$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => '设备', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;*/

$this->title = $model->code;
$this->params['breadcrumbs'][] = ['label' =>$model->park->name, 'url' => ['park/view','id'=>$model->park->id]];
$this->params['breadcrumbs'][] = ['label' =>$model->land->name, 'url' => ['land/view','id'=>$model->land->id]];
$this->params['breadcrumbs'][] = $this->title;

?>
<div class="equip-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <!--?= Html::a('更新', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?-->
        <?= Html::a('删除', ['delete', 'id' => $model->id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => 'Are you sure you want to delete this item?',
                'method' => 'post',
            ],
        ]) ?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
           // 'id',
            'code',
            'comment',
            //'is_delete',
            //'delete_time:datetime',
            //'equip_type_id',
            ['label'=>'设备类别','value'=>$model->equipType->name_ch,],
            ['label'=>'所属园区','value'=>$model->park->name,],
            ['label'=>'所属地块','value'=>$model->land->name,],
        ],
    ]) ?>

</div>
